import { request } from "@/utils/request";
  
  export const api = {
    projectPlanningDocList:
      "/plan/Windchill/servlet/rest/hzero/pmgt/planningbook/getPlanningBooks",
    addPermission:
      "/plan/Windchill/servlet/rest/hzero/pmgt/planningbook/getCDIMPlanningBookAuthority",
    qdlcPermission:
      "/plan/Windchill/servlet/rest/hzero/pmgt/planningbook/getStartWorkFlowAccess",
    deletePlanningBook:
      "/plan/Windchill/servlet/rest/hzero/pmgt/planningbook/deletePlanningBook",
    remergEsignature:
      "/plan/Windchill/servlet/rest/hzero/pmgt/planningbook/remergeEsignature",
    remergeChildBook:
      "/plan/Windchill/servlet/rest/hzero/pmgt/planningbook/remergeChildBook",
    startPlanningBookReview:
      "/plan/Windchill/servlet/rest/hzero/pmgt/planningbook/startPlanningBookReview",
    planTecDataField:
      "/project/Windchill/servlet/rest/hzero/pdm/attribute/getPanleForPlanProject",
    undertakingPartList:
      "/plan/Windchill/servlet/rest/hzero/pmgt/planningbook/getUndertakingPartList",
    institutePlanningBook:
      "/plan/Windchill/servlet/rest/hzero/pmgt/planningbook/getInstitutePlanningBook",
    proAndTechPlanningBook:
      "/plan/Windchill/servlet/rest/hzero/pmgt/planningbook/getProAndTechPlanningBook",
    planningKeyDemand:
      "/plan/Windchill/servlet/rest/hzero/pmgt/planningbook/getPlanningKeyDemand",
    planningKeyPerformance:
      "/plan/Windchill/servlet/rest/hzero/pmgt/planningbook/getPlanningKeyPerformance",
    planningKeyTechnology:
      "/plan/Windchill/servlet/rest/hzero/pmgt/planningbook/getPlanningKeyTechnology",
    planningPlatformSpectrum:
      "/plan/Windchill/servlet/rest/hzero/pmgt/planningbook/getPlanningPlatformSpectrum",
    planningPlatformSpectrumTo:
      "/plan/Windchill/servlet/rest/hzero/pmgt/planningbook/getPlanningPlatformSpectrumTo",
    createGroupAndInstituteBook:
      "/plan/Windchill/servlet/rest/hzero/pmgt/planningbook/createGroupAndInstituteBook",
    createProductTecBook:
      "/plan/Windchill/servlet/rest/hzero/pmgt/planningbook/createProductTecBook",
    instituteBookMessage:
      "/plan/Windchill/servlet/rest/hzero/pmgt/planningbook/getInstituteBookMessage",
    //编辑产品规划书(基本信息)
    productPlanningBookMessage:
      "/plan/Windchill/servlet/rest/hzero/pmgt/planningbook/getProductPlanningBookMessage",
    //保存产品规划书
    saveProductTecBook:
      "/plan/Windchill/servlet/rest/hzero/pmgt/planningbook/saveProductTecBook",
    projectPlanProduct:
      "/plan/Windchill/servlet/rest/hzero/pmgt/planningbook/getProjectPlanProduct",
    projectPlanParts:
      "/plan/Windchill/servlet/rest/hzero/pmgt/planningbook/getProjectPlanParts",
    projectPlanTech:
      "/plan/Windchill/servlet/rest/hzero/pmgt/planningbook/getProjectPlanTech",
    downloadProjectImportFile:
      "/plan/Windchill/servlet/rest/hzero/pmgt/planningbook/downloadProjectImportFile",
    importProjectImportFile:
      "/plan/Windchill/servlet/rest/hzero/pmgt/planningbook/importProjectImportFile",
    technologyPlanningBookMessage:
      "/plan/Windchill/servlet/rest/hzero/pmgt/planningbook/getTechnologyPlanningBookMessage",
    proofreadProductBookName:
      "/plan/Windchill/servlet/rest/hzero/pmgt/planningbook/proofreadProductBookName",
    removeProductTecBook:
      "/plan/Windchill/servlet/rest/hzero/pmgt/planningbook/removeProductTecBook",
    getProductTecBook: 
      "/plan/Windchill/servlet/rest/hzero/pmgt/planningbook/getProductTecBook",
    downloadSelectedBookPdf:
      "/plan/Windchill/servlet/rest/hzero/pmgt/planningbook/downloadSelectedBookPdf",
    updateProjectPlanningBookAttrs:
      "/plan/Windchill/servlet/rest/hzero/pmgt/planningbook/updateProjectPlanningBookAttrs",
    getGroupPlanningBookMessage:
      "/plan/Windchill/servlet/rest/hzero/pmgt/planningbook/getGroupPlanningBookMessage",
    getGroupInstitutePlanningBook:
      "/plan/Windchill/servlet/rest/hzero/pmgt/planningbook/getGroupInstitutePlanningBook",
    getGroupReviewer:
      "/plan/Windchill/servlet/rest/hzero/pmgt/planningbook/getGroupReviewer",
    startPlanningBookAlter:
      "/plan/Windchill/servlet/rest/hzero/pmgt/planningbook/startPlanningBookAlter",
    getProductCategorys:
      "/plan/Windchill/servlet/rest/hzero/pmgt/planningbook/getProductCategorys",
  };
  //规划书主页列表
  export function getProjectPlanningDocList(parameter) {
    return request( {
        url: api.projectPlanningDocList,
        method: 'post',
        data: parameter
    } )
   }
  //获取权限
  export function getAddPermission(parameter) {
    return request( {
      url: api.addPermission,
      method: 'post',
      data: parameter
    } )
  }
  //获取启动流程
  export function getQdlcPermission(parameter) {
    return request( {
      url: api.qdlcPermission,
      method: 'post',
      data: parameter
    } )
  }
  //删除规划书
  export function deletePlanningBook(parameter) {
    return request( {
      url: api.deletePlanningBook,
      method: 'post',
      data: parameter
    } )
  }
  //重新电子签名
  export function remergEsignature(parameter) {
    return request( {
      url: api.remergEsignature,
      method: 'post',
      data: parameter
    })
  }
  //规划书重新合并
  export function remergeChildBook(parameter) {
    return request( {
      url: api.remergeChildBook,
      method: 'post',
      data:parameter
    })
  }
 //启动规划书收集评审流程
  export function startPlanningBookReview(parameter) {
    return request( {
      url: api.startPlanningBookReview,
      method: 'post',
      data: parameter
    } )
  }
  // 编辑产品规划书技术及产品类新增功能获取字段
  export function addPlanTecDataField(parameter) {
    return request( {
      url:api.planTecDataField,
      method: 'post',
      data: parameter
    } )
  }
  //
  export function getUndertakingPartList(parameter) {
    return request( {
      url: api.undertakingPartList,
      method: 'post',
      data: parameter
    } )
  }
  export function getInstitutePlanningBook(parameter) {
    return request( {
      url: api.institutePlanningBook,
      method: 'post',
      data: parameter
    } )
  }
  //获取研究院规划书合并校对信息
  export function getInstituteBookMessage(parameter) {
    return request( {
      url: api.instituteBookMessage,
      method: 'post',
      data: parameter
    } )
  }
  //技术规划书
  export function getProAndTechPlanningBook(parameter) {
    return request( {
      url: api.proAndTechPlanningBook,
      method: 'post',
      data: parameter
    } )
  }
  //获取客户关键需求
  export function getPlanningKeyDemand(parameter) {
    return request( {
      url: api.planningKeyDemand,
      method: 'post',
      data: parameter
    } )
  }
 //获取关键性能
  export function getPlanningKeyPerformance(parameter) {
    return request( {
      url: api.planningKeyPerformance,
      method: 'post',
      data: parameter
    } )
  }
  //获取关键技术
  export function getPlanningKeyTechnology(parameter) {
    return request( {
      url: api.planningKeyTechnology,
      method: 'post',
      data: parameter
    } )
  }
   //获取平台型谱-目前已有
   export function getPlanningPlatformSpectrum(parameter) {
    return request( {
      url: api.planningPlatformSpectrum,
      method: 'post',
      data: parameter
    } )
  }
  //获取平台型谱-拟开发
  export function getPlanningPlatformSpectrumTo(parameter) {
    return request( {
      url: api.planningPlatformSpectrumTo,
      method: 'post',
      data: parameter
    } )
  }
  //创建事业部研究院规划书提交
  export function createGroupAndInstituteBook(parameter) {
     return request( {
      url: api.createGroupAndInstituteBook,
      method: "post",
      data: parameter
     } )
  }
  
  //创建研究院产品规划书
  export function createProductTecBook(parameter) {
    return request( {
      url: api.createProductTecBook,
      method: "post",
      data: parameter
    } )
  }
  export function getProductPlanningBookMessage(parameter) {
    return request( {
      url: api.productPlanningBookMessage,
      method: "post",
      data: parameter
     } )
  }
  export function saveProductTecBook(parameter) {
    return request( {
      url: api.saveProductTecBook,
      method: "post",
      data: parameter
    } )
  }
  //产品类-项目计划表格默认数据
  export function getProjectPlanProduct(parameter) {
    return request( {
      url: api.projectPlanProduct,
      method: "post",
      data: parameter
    } )
  }
  //获取零部件项目计划
  export function getProjectPlanParts(parameter) {
    return request( {
      url: api.projectPlanParts,
      method: "post",
      data: parameter
    } )
  }
  //获取技术类项目计划
  export function getProjectPlanTech(parameter) {
    return request( {
      url: api.projectPlanTech,
      method: "post",
      data: parameter
    } )
  }
  //产品规划书下载
 export function downloadProjectImportFile(parameter) {
   return request( {
     url: api.downloadProjectImportFile,
     method: "post",
     data: parameter,
     responseType: 'blob' //服务器返回的数据类型
   } )
 }
 //技术规划书基本信息
 export function getTechnologyPlanningBookMessage(parameter) {
   return request( {
     url: api.technologyPlanningBookMessage,
     method: "post",
     data: parameter,
   } )
 }
 export function proofreadProductBookName(parameter) {
   return request( {
     url: api.proofreadProductBookName,
     method: "post",
     data: parameter
   })
 }
 //合并校对删除规划书
 export function removeProductTecBook(parameter) {
  return request( {
    url: api.removeProductTecBook,
    method: "post",
    data: parameter,
  } )
 }
//合并校对默认产品规划书
 export function getProductTecBook(parameter) {
  return request( {
    url: api.getProductTecBook,
    method: "post",
    data: parameter,
  } )
 }
 //选择数据进行下载
 export function downloadSelectedBookPdf(parameter) {
   return request( {
     url: api.downloadSelectedBookPdf,
     method: "post",
     data: parameter,
     responseType:'blob',
   })
 }
 //合并校对提交表格
 export function updateProjectPlanningBookAttrs(parameter) {
   return request( {
     url: api.updateProjectPlanningBookAttrs,
     method: "post",
     data: parameter
   })
 }
 //事业部规划书合并校对基本信息
 export function getGroupPlanningBookMessage(parameter) {
  return request( {
    url: api.getGroupPlanningBookMessage,
    method: "post",
    data: parameter
  })
 }
 export function getGroupInstitutePlanningBook(parameter) {
   return request( {
    url: api.getGroupInstitutePlanningBook,
    method: "post",
    data: parameter
   })
 }
 export function getGroupReviewer(parameter) {
  return request( {
    url: api.getGroupReviewer,
    method: "post",
    data: parameter
   })
 }
 
 export function startPlanningBookAlter(parameter) {
  return request( {
    url: api.startPlanningBookAlter,
    method: "post",
    data: parameter
   })
 }
 export function getProductCategorys(parameter) {
   return request( {
     url: api.getProductCategorys,
     method: "post",
     data: parameter
   })
 }
test2